﻿<div id="popup_resource_select" data-toggle="popup" data-type="SelectResource" data-title="选择资源" data-size="large">
    <div id="popup_resource_select_filter" class="popup-content" data-toggle="form" data-field="Resource" data-detailable="true" data-filterable="true" data-size="4,5,7" data-grid="#popup_resource_select_grid">
        <div class="popup-body">
            <div class="form-content">
                <div class="form-body">
                    <div class="row">
                        <input data-field="name,code,title" data-size="6,0,12" data-logic="or" data-operator="contains" />
                        <button data-button="query">查询</button>
                        <button data-button="clear">清除条件</button>
                        <a data-button="advancedSearch" data-target="#popup_resource_select_filter_advanced_search"></a>
                        <div id="popup_resource_select_filter_advanced_search" class="advancedSearch">
                            <div class="row">
                                <input data-field="name" data-label="资源名称" data-operator="contains" data-logic="or" />
                                <input data-field="title" data-label="显示名称" data-operator="contains" data-logic="or" />
                                <input data-field="content" data-label="资源内容" data-operator="contains" data-logic="or" />
                            </div>
                            <div class="row">
                                <input data-field="type" data-label="授权类型" data-role="kendoDropDownList" data-data="#:cache.authorizeType" />
                                <input data-field="resourceType" data-label="资源类型" data-role="kendoDropDownList" data-data="#:cache.resourceType" />
                                <input data-field="accessLevel" data-label="访问级别" data-role="kendoDropDownList" data-data="#:cache.accessLevel" />
                            </div>
                            <div class="row">
                                <input data-field="identityType" data-label="所有者类型" data-role="kendoDropDownList" data-data="#:cache.identityType" data-changed="#:IdentityType.onIdentityTypeChange" />
                                <input data-field="ownerId" data-label="资源所有者" type="hidden" />
                                <input data-field="ownerName" data-label="资源所有者" data-filterable="false" data-popup="SelectRole" data-popup-parameter="#:#_TemplatePopupParameter_SelectOwner" />

                                <input data-field="levelId" data-label="资源级别" type="hidden" />
                                <input data-field="levelName" data-label="资源级别" data-filterable="false" data-popup="SelectLevel" data-popup-parameter="#:#_TemplatePopupParameter_SelectLevel" />
                            </div>
                        </div>
                    </div>
                    <div id="popup_resource_select_grid" data-toggle="grid" node="grid" data-related="#popup_resource_select">
                        <div node="columns" node-type="array">
                            <span data-field="_parent.name" data-title="父级资源"></span>
                            <span data-field="name" data-title="资源名称" data-width="30%"></span>
                            <span data-field="code" data-title="资源编号" data-width="15%"></span>
                            <span data-field="alias" data-title="资源别名" data-hidden="true"></span>
                            <span data-field="title" data-title="资源显示名称"></span>
                            <span data-field="type" data-title="授权类型" data-data-from="cache.authorizeType"></span>
                            <span data-field="resourceType" data-title="资源类型" data-data-from="cache.resourceType"></span>
                            <span data-field="identityType" data-title="资源所有者类型" data-hidden="true" data-data-from="cache.identityType"></span>
                            <span data-field="content" data-title="资源内容" data-width="20%"></span>
                            <span data-field="description" data-title="备注说明" data-hidden="true"></span>
                            <span data-field="createdOn" data-title="创建时间" data-type="datetime" data-hidden="true"></span>
                        </div>
                        <span node="dataSource" data-auto-query="false">
                            <span node="transport">
                                <span node="read" data-url="/odata/Resources?$select=id,name,code,alias,title,type,resourceType,identityType,content,description,createdOn&$expand=parent($select=id,name)">
                                </span>
                            </span>
                            <span node="sort" data-field="code" data-dir="asc"></span>
                        </span>
                    </div>
                </div>
            </div>
        </div>
        <div class="popup-footer text-right">
            <button data-button="ok"></button>
            <button data-button="close"></button>
        </div>
    </div>
</div>